<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Controller_Business extends Controller_Template {
	public function actionIndex() {
		$this->template->title = "BUSINESS DIRECTORY-".$this->settings['title'];
		$this->template->content = new View('business/index');
		$text = Model::factory('directory')->getItemByToken('xrj', 'text');
		$this->template->content->businessText = $text;
		$categories = Model::factory('directory')->getCategories('business', 'position', 'ASC');
		$this->template->content->categories = $categories;
		$items = Model::factory('directory')->getItemsByCategory('business', 'position', 'ASC');
		$this->template->content->items = $items;
	}

	public function actionList()
	{
		$this->template->title = 'BUSINESS DIRECTORY - ' . $this->settings['title'];
		$this->template->content = new View('iframe', array('page' => 'list'));
	}
}
?>
